package cooperate
//
//import (
//	"context"
//
//	"github.com/sirupsen/logrus"
//
//	"git.internal.yunify.com/huangyingjun/qingbilling-gateway/api/generate/pb"
//	"git.internal.yunify.com/huangyingjun/qingbilling-gateway/internal/constants"
//
//	coperate "git.internal.yunify.com/benchmark/benchmark/pkg/cooperate"
//	grpc_client "git.internal.yunify.com/benchmark/benchmark/pkg/grpcx/client"
//	"git.internal.yunify.com/benchmark/benchmark/pkg/util/pbutil"
//)
//
//var cooperateClient pb.NewBillingGatewayManagerClient
//
//func Client() pb.NewBillingGatewayManagerClient {
//	if cooperateClient == nil {
//		c, err := grpc_client.NewClientConn(constants.ServiceCooperate)
//		if err != nil {
//			logrus.Warnf("get client conn fail [%s,%v]", constants.ServiceCooperate, err)
//		}
//		cooperateClient = pb.NewNewBillingGatewayManagerClient(c)
//	}
//
//	return cooperateClient
//}
//
////CreateOplog 存储日志
//func CreateOplog(op *coperate.Oplog) {
//	var (
//		req = new(pb.CreateOplogRequest``)
//		err error
//	)
//
//	defer func() {
//		if err != nil {
//			logrus.Infof("createoplog fail:%v", err)
//		}
//	}()
//
//	if err = pbutil.Decode(op, req); err != nil {
//		return
//	}
//
//	if client := Client(); client != nil {
//		if _, err = client.CreateOplog(context.Background(), req); err != nil {
//			return
//		}
//	}
//
//	return
//
//}
